{% extends "./common_base.html" %}

{% block main %}
<div class="col-mb-12 col-8" id="main" role="main">
    {% for post in posts %}      
    <article class="post">
        <h2 class="post-title">
            <a itemprop="url" href="/posts/detail?id={{post.cid}}">{{post.title}}</a>
        </h2>
        <ul class="post-meta">
            <li>时间:
                <time datetime="{{post.created}}">{{post.created}}</time>
            </li>
            <li>分类:
                <a href="/posts/category?id={{post.mid}}">{{post.metas_name}}</a>
            </li>
        </ul>
        <div class="post-content">
            <p>{{post.text}}</p>
        </div>
    </article>
    {% else %}
    <article class="post">
            <h2 class="post-title">没有找到内容</h2>
        </article>
      {% endfor %}
</div>
<!-- end #main-->

{% include "./common_sidebar.html" %}

{% endblock %}